@layout("/common/_container.html"){
	<!-- PAGE CONTENT BEGINS -->
	<form data-url="${ctxPath}/${code}/save" method="post" class="form-horizontal" role="form">
		<!-- 表单 -->
		@ var _table="blade_dict";
		@ var _col=[
		@			  {name:"字典编号",index:"code", type:"text",newline:true,length:8,required:"required"},
		@			  {name:"字典序号",index:"num", type:"text",newline:true,length:3,required:"required"},
		@			  {name:"上级字典",index:"pid",value:pId!0,type:"combotreeDiy",source:"dict.diy",treeId:"id",check:"radio",newline:false,length:3},
		@			  {name:"字典名称",index:"name", type:"text",newline:true,length:8,required:"required"},
		@			  {name:"备注",index:"tips", type:"text",newline:true,length:8}
		@		   ];
		@ include("/common/_curd/_add.html",{"col":_col,"table":_table}){}
		
		<!-- 按钮 -->
		@ include("/common/_curd/_btn.html",{btn_save:"新增",btn_close:"关闭"}) {}
		
	</form>
	
	<script type="text/javascript">
		$(function(){
			if("${code!}"!=""&&"${pId!}"!=""&&"${num!}"!=""){
				$("#_code").val("${dictcode!}");
				$("#_pid").val("${pId!}");
				$("#_num").val("${num!}");
				$("#_name").focus();
			}
			
			$("#btn_save").bind("click",function(){
				setTimeout(function(){parent.initZtree();}, 499);
			});
		});
	</script>
	
@}
